#include "logger.h"
//#include "threadpool.h"

void testfun(void *arg)
{
    while (true) {
        //        LOGGER::instance()->writelog(LOG_DEBUGG,0,"bbbbb");
        WRITE_LOG(LOG_DEBUGG, 0, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadsfasdfasdf");
        sleep(1);
    }
}

int main()
{
    LOGGER::instance()->setModuleName("TEST");
    LOGGER::instance()->setStorePath("./");
    //是否按小时对日志文件切分，默认按照小时切分，日志文件名添加时间
    LOGGER::instance()->setLogSplitByHout(false);
    //是否按照大小切分
    LOGGER::instance()->setLogFileBySize(1024);

    /*threadpool tp = create_threadpool(10);
    for(int i = 0; i < 10; i++)
        dispatch_threadpool(tp, t, NULL);
    destroy_threadpool(tp);
    */
    testfun(NULL);
}
